package com.gufe.controller.user.mp.quiz;

import com.gufe.result.Result;
import com.gufe.service.user.mp.quiz.LeaderboardService;
import com.gufe.vo.quiz.LeaderboardUserVO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/leaderboard")
public class LeaderboardController {

@Autowired
    private LeaderboardService leaderboardService;

    @GetMapping("/list")
    public Result<List<LeaderboardUserVO>> getLeaderboard() {
        return Result.success(leaderboardService.getLeaderboard());
    }
}